package assignment;

import java.util.HashMap;
import java.util.Map;

public class HomeworkFinalObjJoin {
	private static int result;
	public static void main(String [] args) throws InterruptedException{
		final Map map = new HashMap();
		long start = System.currentTimeMillis();
		Thread t = new Thread(new Runnable() {

			public void run() {
				map.put("result", sum());
			}
			
		});
		t.start();
		t.join();
		System.out.println("result==>" + map.get("result"));
		System.out.println("Use mills==>"+(System.currentTimeMillis()-start));
	}
	
	public static int sum() {
		return fibo(36);
	}
	
	public static int fibo(int a) {
		if(a<2)
			return 1;
		return fibo(a-1)+fibo(a-2);
	} 
}
